/*
 * @file trunk_handler.h
 *
 * @author Michiel Hegemans
 * @author Peter Evers
 *
 * @brief	emotion handler of the trunk.
 */

#ifndef TRUNKHANDLER_H_
#define TRUNKHANDLER_H_

#include "emotion_handler.h"
#include "comm/trunk_msg.h"

class TrunkHandler : public EmotionHandler {
	private:
		ros::Publisher	_trunk_pub;
		comm::trunk			_trunk_state;
	protected:

		/**
		 * Publish trunk emotion.
		 */
		void publish();
	public:
		TrunkHandler();
		~TrunkHandler();

		void init();
		void spin();

		/**
		 * Set the state of the trunk according to the emotion.
		 */
		void processEmotion();

		/**
		 * Set the trunk state.
		 * @state	state of the trunk (emotion state).
		 */
		void setTrunkState(int state);

		/**
		 * Set the trunk angle.
		 * @angle	angle of the trunk (used for rviz only).
		 */
		void setTrunkAngle(float angle);
};


#endif /* TRUNKHANDLER_H_ */
